package pat;

import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created with IntelliJ IDEA.
 * User: leep
 * Date: 14-11-3
 * Time: 下午4:13
 * To change this template use File | Settings | File Templates.
 */
public class Pat {
	public static boolean isMobileNO(String mobiles) {
		Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0-9])|(17[0,6-8]))\\d{8}$");
		Matcher m = p.matcher(mobiles);
		System.out.println(m.matches() + "---");
		return m.matches();
	}

	public static void main(String[] args) throws IOException {
		System.out.println(isMobileNO("170"+"80572081"));
		String dd = "+86363";
		System.out.println(dd.indexOf("+86")>-1);
		String xx = "+8615".replace("+86", "");
		System.out.print(xx);
	}
}
